<?php

/**
 * @author Nguyen Manh Kien
 * @copyright 2013
 */
?>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <!-- Load phan title-->
        <?php $this->load->view('commons/title_head');?>
    <!--Het phan title-->   	
        
        <?php $this->load->helper('url');?>
        
  	<!-- Css-->	
		<link href="<?php echo base_url();?>css/lms-application_bk.css" rel="stylesheet" type="text/css"/>
		<link href="<?php echo base_url();?>css/lms-course_bk.css" rel="stylesheet" type="text/css"/>
		<link href="<?php echo base_url();?>css/footer_bk.css" rel="stylesheet" type="text/css"/>
        <link href="<?php echo base_url();?>css/introduce_policy_ego.css" rel="stylesheet" type="text/css"/>
		
	<!-- JS -->	
		<script type="text/javascript" src="<?php echo base_url();?>js/lms-main_vendor.js" charset="utf-8"></script>	
	</head>
    
    
    
<body class="courseware None">
<!-- Header -->
	<header class="global slim">
		<nav>
			<h1 class="logo">
				<a href="<?php echo base_url()."home_controller/index";?>">     
					<img src="<?php echo base_url();?>images/header-logo.png" alt="Home">      
				</a>
			</h1>
			<h2><span class="provider">Liên hệ</span></h2>
            <?php if (isset($user['USERNAME'])){?>
			<ol class="user">
				<li class="primary">
                   
					<a href="<?php echo base_url()."user_controller/view_user";?>" class="user-link">
						<span class="avatar"></span>
						<span class="sr">Dashboard for: </span> <?php echo $user['USERNAME'];?>
					</a>
				</li>
				<li class="primary">
					<a href="#" class="dropdown"><span class="sr">More options dropdown</span> ▾</a>
					<ul class="dropdown-menu">
					  
						<li><a href="#">Trợ giúp</a></li>
					  
					  <li><a href="<?php echo base_url()."user_controller/log_out"?>">Đăng xuất</a></li>
					</ul>
				</li>
                                
			</ol>
            <?php } else {}?>
		</nav>
	</header>

	<section class="content-wrapper">

		
		<section class="introduce-container">
			<div class="introduce-wrapper">

			<!--Content-->
                <section class="introduce-slogan-wrapper">
                    <h2>Liên hệ với chúng tôi</h2>        
                </section>
	<section class="introduce-content"> 
            <div id="contact_wrapper">
                <div id="contact_left">
                    <h3>Thông tin liên hệ</h3>
                    <img src="<?php echo base_url();?>images/DHKHTN.jpg" />
                    <p>Thầy giáo: <b>Lê Anh Vinh</b><br/> 
                    <b>Trường Đại học Giáo dục - Đại học Quốc Gia Hà Nội</b><br/> 
                    Địa chỉ: 334 Nguyễn Trãi - Thanh Xuân - Hà Nội<br/> 
                    Website: edugreen.vn <br/> 
                    Email: <a href="mailto:vinhla@vnu.edu.vn"><u><i><b>vinhla@vnu.edu.vn</b></i></u></a></p>
                </div>
                <div id="contact_right">
                    <form action="<?php echo base_url()?>user_controller/sent_mail" method="post"
                        enctype="multipart/form-data" id="contact_form">
                     <table class="contact_input">
                          <tr><td>Họ và tên <span style="color:red">(*)</span>:</td></tr>
                          <tr class="contact_br"><td><input  type="text" name="fullname" /></td></tr>
                          <tr><td>Địa chỉ: </td></tr>
                          <tr class="contact_br"><td><input  type="text" name="address" /></td></tr>
                          <tr><td>Email <span style="color:red">(*)</span>:</td></tr>
                          <tr class="contact_br"><td><input  id="email" type="text" name="email"/><lable id="valiEmail"/></td></tr>
                          <tr><td>Số điện thoại : </td></tr>
                          <tr class="contact_br"><td><input  type="text" name="phone" /></td></tr>
                           <tr><td>Tiêu đề liên hệ <span style="color:red">(*)</span>: </td></tr><br/>
                          <tr class="contact_br"><td><input  type="text" name="title"/></td></tr>
                          <tr><td>Nội dung liên hệ <span style="color:red">(*)</span>: </td></tr>
                          <tr class="contact_br"><td><textarea cols="36" rows="10" name="content" maxlength="500"></textarea>
                            </td></tr>
                          <tr>
                              <td><input type="submit" id="click" name="ok" value="Gửi liên hệ"/></td>
                          </tr>
                     </table>
                    </form>
                </div>
            </div>  
	</section>
             
			<!-- End Content -->
			</div>
		</section>
	</section>
	<!--Footer-->
    <?php $this->load->view('commons/footer_all');?>

	<!--Jquery-->
    <script type="text/javascript" src="<?php echo base_url();?>js/lms-application.js" charset="utf-8"></script>
    <script type="text/javascript" src="<?php echo base_url();?>js/lms-modules.js" charset="utf-8"></script>
    <script type="text/javascript" src="<?php echo base_url();?>js/lms-courseware.js" charset="utf-8"></script>
</body></html>
<script type="text/javascript">
<!--
function validateEmail() {
    var emailText = document.getElementById('email').value;
    var pattern = /^[a-zA-Z0-9\-_]+(\.[a-zA-Z0-9\-_]+)*@[a-z0-9]+(\-[a-z0-9]+)*(\.[a-z0-9]+(\-[a-z0-9]+)*)*\.[a-z]{2,4}$/;
    if (pattern.test(emailText)) {
        return true;
    } else {
        alert('Kiểm tra định dạng email');
        return false;
    }
}

window.onload = function() {
    document.getElementById('contact_form').onsubmit = validateEmail;
}

</script>